The power supply of a BB bullet gun depends on a rechargeable battery mounted in a battery compartment which is on the top of the gunstock. A wire connected with power supply wire of the rechargeable battery is provided in the battery compartment, and the wire is connected with the battery compartment by a pluggable connector. The disadvantage in this manner is that the connector needs to be pulled out when charging. In use, the wire in the battery compartment needs to be pulled out, and then the battery is inserted into the battery compartment after a socket on the power supply wire of the rechargeable battery is connected with a plug on the wire thereof. So the operation is rather troublesome and inefficient. In addition, the wire in the battery compartment is relatively long, which occupies space and results in a relatively big structure.